<?php


namespace App\Dao;

use App\Model\MenuModel;

/**
 * Class MenuDao
 * @package App\Dao
 * author:fhc
 * desc:菜单Dao
 * created_at: {2020/10/16}----10:52 上午
 */
class MenuDao extends BaseDao
{
    /**
     * author:fhc
     * desc:获取菜单
     * created_at: {2020/10/16}----10:53 上午
     * @param array $params
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public static function getMenuBuilderQuery($params = [])
    {
        $query = MenuModel::query();



        return $query;
    }

    /**
     * author:fhc
     * desc:获取菜单
     * created_at: {2020/10/16}----10:53 上午
     */
    public static function getMenus(){
        return self::getMenuBuilderQuery()->with('pMenu')->whereHas('pMenu')->get();
    }
}
